//
//  RoomScheduleViewController.h
//  mUBB
//
//  Created by Cosmin Stirbu on 3/13/13.
//  Copyright (c) 2013 Cosmin Stirbu. All rights reserved.
//

#import "BaseViewController.h"
#import "Room.h"
#import "BookingsProtocol.h"
#import "KalView.h"
#import "RoomScheduleView.h"
#import "UpdateBookingViewController.h"
#import <EventKit/EventKit.h>
#import <EventKitUI/EventKitUI.h>


@interface RoomScheduleViewController : BaseViewController<BookingsProtocol, KalViewDelegate, UIScrollViewDelegate, BookingCloudDelegate, UIActionSheetDelegate, UpdateBookingDelegate, EKEventEditViewDelegate, UIPopoverControllerDelegate> {
    // Room
    Room *_room;
    
    // Dictionary holding bookings for dates
    NSMutableDictionary *_bookingsDictionary;
    
    // Selected Date
    NSDate *_selectedDate;
    
    // Previous Date
    NSDate *_previousDate;
    
    // Next Date
    NSDate *_nextDate;
    
    // KalView
    KalView *kalView;
    
    // Calendar logic
    KalLogic *logic;
    
    // Calendar Popover
    IBOutlet UIView *calendarPopOver;
    
    // Previous Date View
    IBOutlet RoomScheduleView *_previousDateView;
    
    // Current Date View
    IBOutlet RoomScheduleView *_currentDateView;
    
    // Next Date View
    IBOutlet RoomScheduleView *_nextDateView;
    
    // Requests counter
    NSInteger _requestsCounter;
    
    // Indicates if we are retrieving all dates
    BOOL *_allDates;
    
    // Selected Booking
    BookingCloud *_selectedBookingCloud;
    
    // UIPopOverCalendar
    UIPopoverController *ipadPopOverController;
}

// ToolBar
@property (unsafe_unretained, nonatomic) IBOutlet UIToolbar *dateToolbar;

// Date Button
@property (unsafe_unretained, nonatomic) IBOutlet UIBarButtonItem *dateButton;

// SelectedDateButton
@property (unsafe_unretained, nonatomic) IBOutlet UIBarButtonItem *selectedDateButton;

// Horizontal Scroll View
@property (unsafe_unretained, nonatomic) IBOutlet UIScrollView *horizontalScrollView;


- (id)initWithNibName:(NSString *)nibNameOrNil room:(Room *)room;

@end
